import {defineStore} from 'pinia'
import {ref,reactive} from 'vue'

const useUserStore = defineStore('user',
() => {
  const loginInfo = reactive({
    username: 'none',
    isLogin: false,
  })

  const loginInfo2 = reactive({
    username: 'none',
    isLogin: false,
    shit: "fuck"
  })
  return { loginInfo,loginInfo2 }
},
{
  persist: true,
})

  export default useUserStore
// const useUserStore = defineStore('user', () >  {   const state = reactive({       username: 'none', isLogin: false  })   function updateState(username, isLogin) {       state.username = username       state.isLogin = isLogin  }   return  {state, updateState}}, {persist: {storage: sessionStorage}})export default useUserStore